const express = require('express')
const app = express()
const port = 3000

// 使用 express.json() 中间件来解析 JSON 请求体
app.use(express.json());

// // 每个机器设备生产哪些物料的路由
// const useRouter = require('./router/jiqi')
// app.use('/api', useRouter)
// 生产计划的路由
const jihuaRouter = require('./router/shengchanjihua')
app.use('/api', jihuaRouter)

// 用户的路由
const userRouter = require('./router/user')
app.use('/api', userRouter)

// 菜单的路由接口
const caidanRouter = require('./router/caidan')
app.use('/api', caidanRouter)

// 材料的路由接口
const CailiaoRouter = require('./router/cailiao')
app.use('/api', CailiaoRouter)

// zhenpi的路由接口
const zhenpiRouter = require('./router/zhenpi')
app.use('/api', zhenpiRouter)



app.get('/', (req, res) => {
  res.send('Hello World!')
})

console.log("进入了端口")

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})